<?php

/**
 * contact : 刘经理 19326416371
 * company : 版权所属 四川北星惯牌科技有限公司
 **/

namespace app\api\controller;

use app\common\controller\Api;
use app\common\library\Authentication\Aliauth;
use app\common\library\InviteCode;
use app\common\manager\BaseManager;
use app\common\manager\GoodsManager;
use app\common\manager\LevelManager;
use app\common\manager\RegionManager;
use app\common\model\Area;
use app\common\model\Region;
use think\Exception;

/**
 * 级别接口
 */
class Level extends Api
{
    protected $noNeedLogin = ['list'];
    protected $noNeedRight = ['*'];

    /**
     * 级别信息
     * @return void
     */
    public function list()
    {
        try {
            $result = LevelManager::List($this->user);
            if ($result['code'] == BaseManager::$successCode){
                $this->success($result['message'],$result['data']);
            }else{
                throw new Exception($result['message']);
            }
        }catch (Exception $e){
            $this->error($e->getMessage());
        }
    }

}
